package com.team.instantsharing.sharing

import org.springframework.web.client.RestTemplate;

import com.team.instantsharing.dto.SharingInfo;
import com.team.instantsharing.ultils.Constant;
import com.team.instantsharing.ultils.ServiceRequest;

class SharingController {

    def index() {
		RestTemplate restTemplate = new RestTemplate();
		List<SharingInfo> listShareInformation = restTemplate.getForObject(Constant.SERVICE_URL + ServiceRequest.GET_SHARE_INFORMATION + "?userEmail=" + session.userEmail, SharingInfo[].class);
		
		[listShareInformation: listShareInformation]
	}
}
